<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%@ include file="function.jsp"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>移动薪资</title>
    <link rel="stylesheet" href="/css/public.css?cache=<%=Math.random()%>">
    <link  href="../../hos_manage/images/favicon.ico?cache=<%=Math.random()%>" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="../../css/palace/salary/mobile_salary.css">
    <script src="/js/jquery-1.9.1.min.js"></script>
</head>
<body id="app" v-cloak>
<%@ include file="../../header.jsp"%>
<!--内容-->
<div class="containerone">
    <%@ include file="../../left_menu.jsp"%>
    <!--右边内容-->
    <div class="right_cont">
        <!--右边导航下面内容-->
        <div class="mobile_salary">
            <div class="title">
                <div class="address-left show-block note">
                    <span class="hover" @click="homePage()">首页</span>
                    <span class="left-distance">></span>
                    <span class="left-distance">薪资上传</span>
                </div>
            </div>
            <div class="container">
                <div class="title-tip">
                    请按照我们提供的
                    <span @click="download('http://file.eeesys.com/attach/1497921849.xls')">
                        <span class="import-tip">标准模板</span>
                    </span>编写
                </div>
                <div class="step-example">
                    <div class="example">
                        <img class="example-image" src="/images/palace/salary/pic-first.png">
                        <div class="example-content">
                            <div class="step-num">
                                第一步
                            </div>
                            <span class="example-tip">上传Excel工资表</span>
                            <%--<span class="import-tip">(查看示例)</span>--%>
                        </div>
                    </div>
                    <img class="step" src="/images/palace/salary/next.png">
                    <div class="example">
                        <img class="example-image" src="/images/palace/salary/pic-second.png">
                        <div class="example-content">
                            <div class="step-num">
                                第二步
                            </div>
                            <span class="example-tip">确认工资字段是否匹配</span>
                            <%--<span class="import-tip">(查看示例)</span>--%>
                        </div>
                    </div>
                    <img class="step" src="/images/palace/salary/next.png">
                    <div class="example">
                        <img class="example-image" src="/images/palace/salary/pic-third.png">
                        <div class="example-content">
                            <div class="step-num">
                                第三步
                            </div>
                            <span class="example-tip">员工手机端查看</span>
                            <%--<span class="import-tip">(查看示例)</span>--%>
                        </div>
                    </div>
                </div>
                <div class="upload" @click="upload()">
                    上传工资表
                </div>
            </div>
        </div>
    </div>
    <excel v-if="excelShow"></excel>
    <sureinfo v-if="sureInfoShow" :uri="uri"></sureinfo>
    <dangertip v-if="dangerTipShow" :title="dangerTitle"></dangertip>
    <messagetip v-if="messageTipShow" :title="messageTitle"></messagetip>
    <delete v-if="deleteShow" :top="delete.top" :title="delete.title" :content="delete.content" :arg="delete.arg"></delete>
</div>
<script src="/js/components/upload.js"></script>
</body>
<%@ include file="/components/danger.jsp"%>
<%@ include file="/components/message.jsp"%>
<%@ include file="/components/single_select.jsp"%>
<%@ include file="/components/salary/upload_excel.jsp"%>
<%@ include file="/components/salary/sure_info.jsp"%>
<%@ include file="/components/delete.jsp"%>
<script>
    var HOSPITAL = "${user.hospital}";
    new Vue({
        el: "#app",
        data: {
            dangerTipShow: false,
            excelShow: false,
            sureInfoShow: false,
            dangerTitle: "",
            uri: "",
            messageTipShow: false,
            messageTitle: "",
            deleteShow: false,
            delete: {
                top: "",
                title: "",
                content: "",
                arg: {},
            }
        },
        methods: {
            download: function(href) {
                var _this = this;
                this.deleteShow = true;
                this.delete.top = "批量导入";
                this.delete.title = "下载模板";
                this.delete.content = "即将下载模板";
                this.delete.arg = function() {
                    location.href = href;
                }
            },
            upload: function() {
                this.excelShow = true;
            },
            homePage: function () {
                location.href = "../../index.jsp";
            },
        },
        events: {
            danger: function(title) {
                this.dangerTitle = title;
                this.dangerTipShow = true;
            },
            dangerTipOver: function() {
                this.dangerTipShow = false;
            },
            deleteCancel: function() {
                this.deleteShow = false;
            },
            message: function(title) {
                this.messageTitle = title;
                this.messageTipShow = true;
            },
            messageTipOver: function() {
                this.messageTipShow = false;
            },
            closeSureInfo: function() {
                this.sureInfoShow = false;
            },
            closeUploadExcel: function() {
                this.excelShow = false;
            },
            // 成功上传excel
            uploadExcelSuccess: function(uri) {
                this.excelShow = false;
                this.sureInfoShow = true;
                this.uri = uri;
            }
        },
        ready: function() {

        },
        components: {
            excel: uploadExcel,
            dangertip: dangerTip,
            sureinfo: sureInfo,
            messagetip: messageTip,
            delete: deleteTip,
        }
    });
</script>
</html>
